<div class="mood" ng-controller="mood">
    <section class="addMood">
        <div id="message" class="successbox" ng-show="success" >{{word}}</div>
        <div id="message" class="successbox" ng-show="success" >{{word}}</div>
        <form name="form" ng-submit="postMood()">
            <textarea ng-model="mood" placeholder="心情" required maxlength="100" cols="50" rows="2" style="resize:none"></textarea>
            <input type="submit" value="心情">
        </form>
    </section>
    <section>
        <ul class="replyUl">
            <li class="replyLi" ng-repeat="item in moods">
                <div>
                    <name>{{item.name}}</name><br>
                    <time>{{item.time.day}} {{item.time.minute}}</time>
                    <a class="delete" ng-show="name == rootname" ng-click="deleteMood(item._id)">删除</a>
                    <p class="comment">{{item.mood}}</p>
                    <br>
                    <div>
                        <ul>
                            <li ng-repeat="li in item.answers">
                                <name>{{li.name}} :</name>
                                <span>{{li.comment}}</span><br>
                                <time>{{li.time.day}} {{li.time.minute}} </time>
                                <a class="delete" ng-show="name == rootname" ng-click="deleteComment(item._id, li.commentId)">删除</a>
                            </li>
                        </ul>
                    </div>
                </div>
                <div class="reply">
                    <form ng-submit="reply(item._id)">
                        <textarea placeholder="评论" class="a{{item._id}}"  required cols="50" rows="1" style="resize:none"></textarea>
                        <input type="submit" value="评论">
                    </form>
                </div>
            </li>
        </ul>
    </section>
</div>